#####custom
prefix_xilinx=/usr/local/mscore_xilinx
include platform/xilinx_linux.mk
prefix_x8664=/usr/local/mscore
prefix_aarch64=/usr/local/mscore_aarch64
prefix_armv7l=/usr/local/mscore_armv7l
export PKG_CONFIG_PATH=${prefix_x8664}/lib/pkgconfig:${prefix_aarch64}/lib/pkgconfig:${prefix_armv7l}/lib/pkgconfig:${prefix_xilinx}/lib/pkgconfig:$PKG_CONFIG_PATH
#########
PROGRAM_NAME=libmstool

OUT_LIB=out/lib
OUT_BIN=out/bin
OUT_INCLUDE=out/include/$(PROGRAM_NAME)

OUT_JNISRC=out/$(PROGRAM_NAME)jni_source
OUT_JNILIB=$(OUT_JNISRC)/lib
OUT_JNIINCLUDE=$(OUT_JNISRC)/include

D_BASEAPI_FLAGS= \
	-DOS_LINUX_SOC \
	-D_GNU_SOURCE 

CFLAGS_SHARE=-shared -fPIC
C_SRC= \
	src/msautomaintenance.c \
	src/msautomount.c \
	src/msemail.c \
	src/msethtool.c \
	src/mseventPush.c \
	src/msfeedback.c \
	src/msperformance.c \
	src/msphddns.c \
	src/msiproute.c \
	src/mspppoe.c \
	src/msrouter.c \
	src/mssched.c \
	src/msifconfig.c \
	src/msdhcp.c \
	src/mstool.c\
	src/msweb.c \
	src/msuser_control.c \
	src/msautodelete.c

all: x8664

test:x8664 aarch64 armv7l

include platform/x8664_linux.mk
include platform/aarch64_linux.mk
include platform/armv7l_linux.mk
	
clean:
	rm  out -fr
help:
	@echo "USAGE:make target"
	@echo "    x8664		Produce the ${PROGRAM_NAME}.so,and install it"
	@echo "    aarch64		Produce the ${PROGRAM_NAME}.so and install it on arm64 platform"
	@echo "    armv7l		Produce the ${PROGRAM_NAME}.so and install it on armv7l platform"
	@echo "    clean		Clear out"
	@echo "    ms_automount	Sample program with ${PROGRAM_NAME} api"

